package com.speljohan.rsbot.event.events;

import java.awt.Graphics;
import java.util.EventListener;

import com.speljohan.rsbot.event.EventMulticaster;
import com.speljohan.rsbot.event.listeners.TextPaintListener;

/**
 * A paint text event is only valid when it is being dispatched.
 * */
public class TextPaintEvent extends RSEvent {
	private static final long serialVersionUID = 6634362568916377937L;
	public Graphics graphics;
	public int idx;

	@Override
	public void dispatch(final EventListener el) {
		idx = ((TextPaintListener) el).drawLine(graphics, idx);
	}

	@Override
	public long getMask() {
		return EventMulticaster.TEXT_PAINT_EVENT;
	}
}
